﻿using Camc.Quality.QualityAnalysis.RFormBase;
using Camc.Quality.QualityAnalysis.RFormClass;
using Camc.Quality.RecordTable.FormBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.QualityAnalysis.RFormEntity
{
  public  class R状态检查表 : RTableBase
    {
        public R状态检查表(int serialNum, Guid rWorkStepEntityId, Guid rProcessesEntityId, int sort, string recordElement ,string recordRemark)
        {
            SerialNum = serialNum;
            RWorkStepEntityId = rWorkStepEntityId;
            RProcessesEntityId = rProcessesEntityId;
            Sort = sort;

            RecordElement = recordElement;
            RecordRemark = recordRemark;
        }
        public override string FormName { get; protected set; } = "状态检查表";

        public override string RecordElement_DisplayName { get; protected set; } = "确认项目";

        /// <summary>
        /// 实测值
        /// </summary>
        /// <param name="measuredValues"></param>
        public RMeasuredResultEntity SetMeasuredResult(RMeasuredResultEntity entity, string confirmResult)
        {
            entity.SetConfirmResult(confirmResult, "确认结果");
            return entity;
        }
        public RRecordRequirementsEntity SetRecordRequirements(RRecordRequirementsEntity entity, string recordRequire)
        {
            entity.SetRecordRequire(recordRequire, "部门");
            return entity;
        }
        public RInspectionSignatureEntity SetInspectionSignature(RInspectionSignatureEntity entity, string firstOperator, DateTime? firstOperatorTime)
        {
            entity.InspectionSignatureName = "一检";
            entity.SetFirstOperator(firstOperator, "确认者", firstOperatorTime,"确认者操作时间");
            return entity;
        }
    }
}
